package com.authine.cloudpivot.ext.kingdee.work;


import com.alibaba.cola.dto.SingleResponse;
import com.authine.cloudpivot.ext.dto.kingDee.request.RecordingVoucherManual;
import com.authine.cloudpivot.ext.dto.voucher.RecordVoucher;
import lombok.extern.slf4j.Slf4j;

import java.util.Collection;
import java.util.List;

@Slf4j
public class RecordVoucherWork extends BaseWork {


    public SingleResponse<String> saveRecordingVoucher( RecordingVoucherManual recordingVoucherManual){
        //todo 源代码没有逻辑
        return  null;
    }

// 单表操作原生框架支持
//    @Path("pageRecordingVoucher")
//    @POST
//    @Operation(summary = "凭证列表",tags = CUSTOM_SERVICE)
//    public SingleResponse<List<RecordVoucher>> pageRecordingVoucher(@Parameter RecordingVoucherQuery query){
//
//        return null;
//    }

    public SingleResponse<List<RecordVoucher>> getVoucherByBusinessIds( Collection<String> businessIds){

        log.info("获取已生成凭证记录的数据  businessIds:{}", businessIds);

        List<RecordVoucher> recordVoucherList = recordVoucherRepository.findByBusinessIds(businessIds);
        SingleResponse singleResponse = SingleResponse.buildSuccess();
        singleResponse.setData(recordVoucherList);
        log.info("获取已生成凭证记录的数据  业务逻辑处理结束 <<<");
        return singleResponse;
    }

}
